<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <title>在线阅读PDF文件</title>
</head>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script type="text/javascript">
    function onLineReadPDF() {
        /*window.open("../static/pdf/web/viewer.html?file=/preview");*/
        $("#iframe_0").attr("src","../static/pdf/web/viewer.html?file=/preview");
    }
    function changeFrameHeight(that){
        //电脑屏幕高度-iframe上面其他组件的高度
        //例:我这里iframe上面还有其他一些div组件，一共的高度是120，则减去120
        $(that).height(document.documentElement.clientHeight - 120);

    }
</script>
<body>
<h1 onclick="onLineReadPDF()">在线阅读PDF文件</h1>
<a ref="./ssoclient/login">Login to SSO Server</a>
<iframe id="iframe_0" src="" width="100%" height="100%" onload="changeFrameHeight(this)" scrolling="yes" frameborder="no" border="0" marginwidth="0" marginheight="0" allowtransparency="yes">
</iframe>
</body>
</html>